package cn.net.lwj.init;


import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import org.apache.log4j.Logger;


public class InitServlet implements ServletContextListener {
    private Logger log= Logger.getLogger(this.getClass());

    // 系统初始化执行方法
    public void contextDestroyed(ServletContextEvent e) {
        log.info("系统停止...");
    }

    public void contextInitialized(ServletContextEvent e) {

    log.info("听说初始化执行本函数哦 ");

        try {

            //CommonPropertites commonProperties = (CommonPropertites) SpringBeanHelper.getBean(e.getServletContext(), "fzbaCommonProperties");
            //ConfigManager configManager=(ConfigManager) SpringBeanHelper.getBean(e.getServletContext(), "configManager") ;
            //StaticUtils staticUtils=new StaticUtils();
            //log.info("系统初始化开始["+commonProperties.FY_DQ+"]...");
            //不知道注释掉行不行
            //configManager.initOptions();
            //configManager.initFymcMap();
            //staticUtils.initFymcMap();
            //configManager.initForm();
            //configManager.initParam();
            //configManager.initTree();
        } catch (Exception e1) {
            e1.printStackTrace();
        } finally{
            log.info("系统初始化结束...");
        }

    }
}
